#include "contact.h"


int main()
{
    int select = 0;//接收用户的选择
    struct AddressBooks contact;
    contact.m_size = 0;
    while (1)
    {
        // 打印菜单
        ShowMenu();
        cout << "请输入您的选择: ";
        cin >> select;
        switch(select)
        {
            case 1:
                AddPerson(&contact);//添加联系人
                break;
            case 2:
                ShowPerson(&contact);//显示所有联系人
                break;
            case 3:
                DeletePerson(&contact);//删除联系人
                break;
            case 4:
                FindPerson(&contact);//查找联系人
                break;
            case 5:
                ModifyPerson(&contact);
                break;
            case 6:
                CleanPerson(&contact);
                break;
            case 0:
                cout << "欢迎下次使用" << endl;
                return 1;
                break;
            default:
                cout << "输入有误!" << endl;
                break;
        }
    }
    return 0;
}